/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package obiektyturystyczne;

import java.util.Objects;

/**

 @author Tomek
 */
public class IndeksWartosc {
	int indeks;
	String wartosc;

	public IndeksWartosc(int indeks, String wartosc) {
		this.indeks = indeks;
		this.wartosc = wartosc;
	}

	@Override
	public String toString() {
		return wartosc;
	}
        
    @Override
        public boolean equals(Object x) {
            return indeks==((IndeksWartosc)x).indeks && wartosc.equals(((IndeksWartosc)x).wartosc);
        }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 59 * hash + this.indeks;
        hash = 59 * hash + Objects.hashCode(this.wartosc);
        return hash;
    }

}
